package com.dys.pojo;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * @className: com.dys.pojo.Person
 * @description: com.dys.pojo
 * @author: pine cone
 * @version: v1.0.0
 * @createTime: 2024/10/26 15:54
 */
public class Person3 implements java.io.Serializable {
    private String pname;
    private String page;
    private String sex;
    private String[] hobby;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthDate;
    private List<Pet> pets;

    public Person3() {
    }

    public Person3(String pname, String page, String sex, String[] hobby, Date birthDate, List<Pet> pets) {
        this.pname = pname;
        this.page = page;
        this.sex = sex;
        this.hobby = hobby;
        this.birthDate = birthDate;
        this.pets = pets;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public String getPage() {
        return page;
    }

    public void setPage(String page) {
        this.page = page;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String[] getHobby() {
        return hobby;
    }

    public void setHobby(String[] hobby) {
        this.hobby = hobby;
    }

    public Date getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }

    public List<Pet> getPets() {
        return pets;
    }

    public void setPets(List<Pet> pets) {
        this.pets = pets;
    }

    @Override
    public String toString() {
        return "Person3{" +
                "pname='" + pname + '\'' +
                ", page='" + page + '\'' +
                ", sex='" + sex + '\'' +
                ", hobby=" + Arrays.toString(hobby) +
                ", birthDate=" + birthDate +
                ", pets=" + pets +
                '}';
    }
}
